import { createStore } from 'vuex'
import counterModule from './modules/counter'
// import storagePlugin from './plugins/storage'
import createPersistedState from "vuex-persistedstate"

const store = createStore({
  strict: true, // 开启严格模式

  // plugins: [storagePlugin],
  plugins: [createPersistedState()],

  // state: {},
  // getters: {},
  // mutations: {},
  // actions: {},

  // 将各独立的模块最终合并到根模块中来
  modules: {
    counter: counterModule,
  },
})

export default store
